package com.jwds.digital.bios.business.api.controller.belt;


import com.jwds.digital.bios.business.core.infrastructure.dto.belt.BeltRouteHistoryDayDTO;
import com.jwds.digital.bios.business.core.infrastructure.vo.belt.BeltRouteHistoryDayVO;
import com.jwds.digital.bios.business.service.service.belt.IBeltRouteHistoryDayService;
import com.jwds.digital.bios.business.service.service.belt.IBeltRoutePerformanceDayService;
import com.jwds.digital.bios.business.core.infrastructure.dto.belt.BeltRoutePerformanceDayReqDTO;
import com.jwds.digital.bios.business.core.infrastructure.vo.belt.BeltRoutePerformanceDayRespVO;
import com.jwds.tdc.framework.application.lib.BaseResponse;
import com.jwds.tdc.framework.application.lib.page.PageRequest;
import com.jwds.tdc.framework.application.lib.page.PageResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List;
import javax.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

/**
 * 线路历史数据天表 前端控制器
 *
 * @author 席鹏程
 * @date 2024-11-14
 */
@Slf4j
@Api(tags = "线路历史数据天表")
@RestController
@RequestMapping("/belt/route/history/day")
public class BeltRouteHistoryDayController {

    @Resource
    private IBeltRouteHistoryDayService service;


    @PostMapping("/list")
    @ApiOperation(value = "分页查询")
    public BaseResponse<PageResponse<BeltRouteHistoryDayVO>> page(@Valid @RequestBody PageRequest<BeltRouteHistoryDayDTO> pageRequest) {
        PageResponse<BeltRouteHistoryDayVO> respVoPage = service.page(pageRequest);
        return BaseResponse.success(respVoPage);
    }

    @PostMapping("/all")
    @ApiOperation(value = "列表查询")
    public BaseResponse<List<BeltRouteHistoryDayVO>> list(@Valid @RequestBody BeltRouteHistoryDayDTO reqDto) {
        List<BeltRouteHistoryDayVO> respVoList = service.list(reqDto);
        return BaseResponse.success(respVoList);
    }



}
